cmake_minimum_required(VERSION 3.10)
project(coroutine_examples)

if(CMAKE_CXX_COMPILER_ID MATCHES Clang)
  if(CMAKE_SYSTEM_NAME MATCHES Linux)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
  endif()
  add_subdirectory(coroutines_ts)
  add_subdirectory(cppcoro)
elseif(CMAKE_CXX_COMPILER_ID MATCHES GNU)
  add_subdirectory(manual_iteration)
  if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
    add_subdirectory(coroutines_ts)
  endif()
elseif(MSVC)
  add_subdirectory(manual_iteration)
  add_subdirectory(coroutines_ts)
  add_subdirectory(cppcoro)
  add_subdirectory(msvc)
endif()

add_subdirectory(boost_coroutine2)
